import request from '../utils/request'


export function getCommentsById(postId) {
    return request({
      url: '/comments/getByPostId',
      method: 'get',
      params:{postId:postId}
    })
}

export function like(commentId,postId) {
  return request({
    url: '/comments/like',
    method: 'get',
    params:{
      commentId:commentId,
      postId:postId
    }
  })
}

export function addComment(comments) {
  return request({
    url: '/comments/save',
    method: 'post',
    data:comments
  })
}